package com.sinbad.shardingsphere.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Builder;
import lombok.Data;

import java.io.Serializable;

/**
 * <p>
 * 用户表
 * </p>
 *
 * @author sinbad
 * @since 2021-09-30
 */
@Data
@Builder
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    @JSONField(ordinal = 1)
    private Long id;

    /**
     * 用户名
     */
    @JSONField(ordinal = 2)
    private String userName;

    /**
     * 年龄
     */
    @JSONField(ordinal = 3)
    private Integer age;

    /**
     * 地址
     */
    @JSONField(ordinal = 4)
    private String address;

}
